package cn.wolfcode.crm.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Getter@Setter
public class StockOutBill {


    public static final Integer NORMAL = 1;//未审核状态
    public static final Integer AUDIT = 2; //已审核状态

    private Long id;
    private String sn; //出库编号
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date vdate; //业务时间

    private Integer status = NORMAL; //单据状态
    private BigDecimal totalAmount; //出库总额
    private BigDecimal totalNumber; //出库总数量

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date auditTime; //审核时间
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date inputTime; //录入时间

    private Employee inputUser;//录入人
    private Employee auditor; //审核人

    private Depot depot; //仓库

    private Member member; //会员

    //包含的出库明细
    private List<StockOutBillItem> items = new ArrayList<>();

}
